<?php
if($_POST["btn_logar"] == "Entrar"){
    if(!login()){
        echo "<script>alert('Falha no login')</script>";
    }
}
?>
                <form action="" method="post" id="form_login">
                    <h1>ÁREA RESTRITA</h1>
                    
                    <div class="dv_label">
                        <label>Login</label>
                    </div>
                    <div class="dv_camp">
                        <input type="text" name="login" autofocus>
                    </div>
                    <div class="dv_label">
                        <label>Senha</label>
                    </div>
                    <div class="dv_camp">
                        <input type="password" name="senha" autocomplete="off">
                    </div>
                    <div class="dv_btn_logar">
                        <input type="hidden" name="btn_logar" value="Entrar">
                        <button class="button">Entrar</button>
                    </div>
                </form>
